#欧拉筛法求素数
n = eval(input())
l = list(range(2,n+1))
for x in l:
    for y in range(2*x,n+1,x):
        if y in l:
            l.remove(y)
print(l)